From: kfraser@localhost.localdomain Date: Sun, 15 Oct 2006 08:19:26 +0000 (+0100) Subject: [XEND] Check for and fail on non-existent floppy-drive file when starting HVM guest. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15589^2~94 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=dae75267fdddb37833f994902949c25d9581ea43;p=xen.git [XEND] Check for and fail on non-existent floppy-drive file when starting HVM guest. The qemu device model hangs when a non-existent floppy file is passed via 'fda' or 'fdb'. The attached patch checks whether the floppy file exists and raises an error if it does not. Signed-off-by: Stefan Berger --- diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index 28a8952eec..fe416e2ba5 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -312,6 +312,11 @@ class HVMImageHandler(ImageHandler): if v: ret.append("-%s" % a) ret.append("%s" % v) + + if a in ['fda', 'fdb' ]: + if v: + if not os.path.isfile(v): + raise VmError("Floppy file %s does not exist." % v) log.debug("args: %s, val: %s" % (a,v)) # Handle disk/network related options